package com.xqls.dal.dao.mybatis;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.xqls.dal.dao.MessageDao;
import com.xqls.dal.model.Message;
import com.xqls.dal.model.MessageExample;
import com.xqls.dal.service.MessageMapper;

@Repository
public class MessageDaoImpl implements MessageDao{

	@Autowired private MessageMapper mapper;
	
	@Override
	public boolean insert(Message record){
		return mapper.insertSelective(record)>0;
	}
	
	@Override
	public Message selectByKey(Integer key){
		return mapper.selectByPrimaryKey(key);
	}
	
	@Override
	public List<Message> selectByExample(MessageExample example){
		return mapper.selectByExample(example);
	}
	
	@Override
	public List<Map<String, Object>> selectByMap(Map<String, Object> map){
		return mapper.selectByMap(map);
	}
}
